<?php
include('../../inc/global.inc');
include("../islogin.php");
$url = $_SERVER["HTTP_REFERER"];
if(empty($_GET["id"]))
{
    echo '<script>alert("发生错误!");location="'.$url.'"</script>' ;  
}
else
{
    $id=$_GET["id"];
    $sql="delete  from p_list where id=$id";
    mysql_query($sql);
    $sql2 = "delete from product where p_list_id=".$id;
    mysql_query($sql2);
    echo '<script>alert("已删除此分类及其下面的产品!");location="'.$url.'"</script>' ;
}
?>
